%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% File:               table_game2s.m
%
% Author:             Miguel R. Rueda and Sergio Ascencio
%
% Description:        returns structural parameters of representatives allocation game. 
%
% Language:           MATLAB R2013b (8.2.0.701) 64 Bit
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function results=table_game2(beta,ses,labels)

A=[beta ses];
table=reshape(A',[size(ses,2) 2*size(A,1)])';

labels_taba=[labels {'ldist_party' 'Gov' 'H' 'M' 'H' 'M' 'Constant'}];

labels_tabb=repmat({''},[size(labels_taba,2) 1]);
labels_coeff=reshape([labels_taba' labels_tabb]',[1 size(labels_taba,2)*2])';

results=dataset({labels_coeff,'Vars'},{table, 'PRI_M' 'PRI_H' 'PAN_M' 'PAN_H' 'PRD_M' 'PRD_H'});

